;; extends

; hide useless characters
(_ (";" @conceal (#set! conceal "")) .)
(for_statement ["(" ")"] @conceal (#set! conceal ""))
(for_statement (_ (";" @punctuation.delimiter (#set! conceal ";")) .))
(catch_clause ["(" ")"] @conceal (#set! conceal ""))
(if_statement condition: (parenthesized_expression (["(" ")"] @conceal (#set! conceal ""))))
(while_statement condition: (parenthesized_expression (["(" ")"] @conceal (#set! conceal ""))))
(do_statement condition: (parenthesized_expression (["(" ")"] @conceal (#set! conceal ""))))
(switch_statement value: (parenthesized_expression (["(" ")"] @conceal (#set! conceal ""))))
; ("this" @conceal (#set! conceal ""))

; prettier operators
("=" @operator (#set! conceal "≔"))
(assignment_expression ("=" @operator (#set! conceal "←")))
("!" @operator (#set! conceal "¬"))
("!=" @operator (#set! conceal "≉"))
("!==" @operator (#set! conceal "≠"))
("&" @operator (#set! conceal "∩"))
("&&" @operator (#set! conceal "∧"))
("*" @operator (#set! conceal "⋅"))
("*=" @operator (#set! conceal "⋅="))
("<<" @operator (#set! conceal "«"))
("<=" @operator (#set! conceal "≤"))
("==" @operator (#set! conceal "≈"))
("===" @operator (#set! conceal "="))
(">=" @operator (#set! conceal "≥"))
(">>" @operator (#set! conceal "»"))
("^" @operator (#set! conceal "△"))
("|" @operator (#set! conceal "∪"))
("||" @operator (#set! conceal "∨"))

; prettier constants
((true) @boolean (#set! conceal "✔"))
((false) @boolean (#set! conceal "✘"))

; Prettier string escapes
((escape_sequence) @string.escape (#eq? @string.escape "\\n") (#set! conceal "⏎"))
